<?php

/**
 * @developer socheat 
 * @copyright 2012
 */         
            

	

//seller
    $wseller        = "theme.by_company_id='".$_SESSION['acc_id']."'"; 
    $getseller      = new seller();
    $seller_all     = $getseller->sellers($wseller);
    $seller_row     = mysql_fetch_assoc($seller_all);
// end seller  

    $langs = $seller_row['language'];         
?>
<script type="text/javascript" src="<?php echo W_ROOT;?>/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
            tinyMCE.init({
                            // General options
                            mode : "textareas",
                            theme : "advanced",
                            plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
                            

                            // Theme options
                            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
                            //theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                            //theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
                            //theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
                            theme_advanced_toolbar_location : "top",
                            theme_advanced_toolbar_align : "left",
                            theme_advanced_statusbar_location : "bottom",
                            theme_advanced_resizing : true,

                            // Skin options
                            skin : "o2k7",
                            skin_variant : "silver",

                            // Example content CSS (should be your site CSS)
                            content_css : "css/example.css",

                            // Drop lists for link/image/media/template dialogs
                            template_external_list_url : "js/template_list.js",
                            external_link_list_url : "js/link_list.js",
                            external_image_list_url : "js/image_list.js",
                            media_external_list_url : "js/media_list.js",
                            extended_valid_elements :  "iframe[src|width|height|name|align]",

        // Replace values for the template plugin
                            template_replace_values : {
                                    username : "Some User",
                                    staffid : "991234"
                            }
});
</script>
	<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
	<style>
    .toggler
    {
        margin: 10px 0 0 0;
    }
	.button {		
		text-decoration: none;        
	}
    .point
    {
        cursor: pointer;
    }
	#effect {
		position: relative;
		padding: 0.4em;
	}
	h3.statistic {
		margin: 0;
		padding: 0.4em;
		text-align: left;
        font-size: 14px;
        display:block;
	}
    .t_none
    {
        border:none;
    }
	</style>
<div style="margin: 10px 15px 0 0;"> 
<form class="custom" enctype="multipart/form-data" action="../process.php?action=update" method="post">
<!--last article-->  
		<h3 class="statistic point ui-widget-header ui-corner-all"><!--General Settings--><?php echo $lang['GSETTING'];?></h3>    
<table class="t_none" width="100%" border="0" cellspacing="0" cellpadding="0">
<?php
if(isset($_GET['info']))
    {
?>
    <tr>
        <td style="width: 280px;"><!--Site Title--><?php echo $lang['SITETITTLE'];?></td>
        <td><input type="text" name="sitename" value="<?php echo $seller_row['sitename'];?>" /></td>
    </tr>        
    <tr>
        <td><!--Descriptions--><?php echo $lang['DISCRIPTION'];?></td>
        <td><textarea type="text" name="tagline" style="width: 99%;"><?php echo $seller_row['site_tagline'];?></textarea></td>
    </tr>
    <tr>
        <td><!--Timezone--><?php echo $lang['TIMEZONNE'];?></td>
        <td>
            <?php
                include(S_ROOT.'/includefiles/timezone.php'); 
            ;?>
        </td>
    </tr>
    <tr>
        <td><!--Language--><?php echo $lang['LANGUAGGE'];?></td>
        <td>    
            <select name="language">
                <option value="en" <?php echo($langs=='en')?' selected="selected"':''?>>en - English</option>
                <option value="km" <?php echo($langs=='km')?' selected="selected"':''?>>km - Khmer</option>
            </select>
            <input name="info" type="hidden" value="1" />            
        </td>
    </tr>
<?php
    }
if(isset($_GET['url']))
    {
?>
    <tr>
        <td><!--URL--><?php echo $lang['URLL'];?><span class="right"><?php echo W_ROOT;?>/</span></td>
        <td>
            <input type="text" name="sorturl" value="<?php echo $seller_row['shorturl'];?>" />
            <input name="sorturls" type="hidden" value="1" />
        </td>
    </tr>
<?php
    }
if(isset($_GET['changelogo']))
    {
?>
    <tr>
        <td>
            <input type="file" class="b" name="logo_image" id="file" />
            <input name="chlogo" type="hidden" value="1" />
        </td>
    </tr>
<?php    
    }
?>    
</table>
<!--end last article--> 

<input type="submit" name="global_setting" class="btn" value="Submit" />    <a href="<?php echo W_ROOT;?>/company/action/?p=setting/index" class="btn"><!--Back--><?php echo $lang['BACKK'];?></a>

</form>
</div>  